Skip to content

Add rmw_zenoh_pico to emscripten builds #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

traversaro
Copy link
Member

Fix #309 .

However, I am not sure if rosdistro_additional_recipes works fine if no rosdistro_snapshot is specified, as currently in emscripten builds.

@Tobias-Fischer
Copy link
Contributor

Hmm unfortunately it seems like it doesn’t work: “ Could not generate output for rmw_zenoh_pico”

@traversaro
Copy link
Member Author

That make sense, if rosdistro_snapshot is not in the conf file, then all snapshot are ignored: https://github.com/RoboStack/vinca/blob/47bfdcd7b4701536638b208951ddda6a3a70ff1a/vinca/main.py#L224-L237 . Probably a quick workaround is jut to create a snapshot for emscripten.

@traversaro
Copy link
Member Author

In bbd2ef9 I added a custom snapshot for emscripten32 . On the next full rebuild, we can probably align the snapshot used by the different platforms.

@Tobias-Fischer
Copy link
Contributor

Hmmm still the same message :(

@Tobias-Fischer

This comment was marked as outdated.

@traversaro
Copy link
Member Author

There was a malformed field in a556830 .

@traversaro
Copy link
Member Author

The PR is now (silently, due to RoboStack/ros-jazzy#86) failing with error:

   with urllib.request.urlopen(raw_url) as resp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/bin/vinca", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/site-packages/vinca/main.py", line 1198, in main
    selected_pkgs = get_selected_packages(distro, vinca_conf)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/site-packages/vinca/main.py", line 767, in get_selected_packages
    pkgs = distro.get_depends(i, ignore_pkgs=skipped_packages)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/site-packages/vinca/distro.py", line 54, in get_depends
    xml_str = self.get_package_xml_for_additional_package(pkg_info)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/ros-humble/ros-humble/.pixi/envs/beta/lib/python3.11/site-packages/vinca/distro.py", line 161, in get_package_xml_for_additional_package
    raise RuntimeError(f"Failed to fetch package.xml from {raw_url}: {e}")
RuntimeError: Failed to fetch package.xml from https://raw.githubusercontent.com/esol-community/rmw_zenoh_pico/1.3.1/package.xml: HTTP Error 404: Not Found

The problem is that vinca should be modified to accept an optional argument in case the ROS package is not in the root of the repo.

@traversaro
Copy link
Member Author

The problem is that vinca should be modified to accept an optional argument in case the ROS package is not in the root of the repo.

I looked into it in this https://github.com/RoboStack/vinca/tree/fixhumble309 , but I think a prerequisite is to modify vinca to actually generate a different bld_**.* script for each recipe, instead of having a single build script for multiple recipes. This is something desirable also to make the recipe more easily relocatable, and it is probably a prerequisite for RoboStack/vinca#82 . I think I can work on this, but I do not have a timeline for this.

@traversaro
Copy link
Member Author

The problem is that vinca should be modified to accept an optional argument in case the ROS package is not in the root of the repo.

I looked into it in this https://github.com/RoboStack/vinca/tree/fixhumble309 , but I think a prerequisite is to modify vinca to actually generate a different bld_**.* script for each recipe, instead of having a single build script for multiple recipes. This is something desirable also to make the recipe more easily relocatable, and it is probably a prerequisite for RoboStack/vinca#82 . I think I can work on this, but I do not have a timeline for this.

Ok, the problem is fixed by RoboStack/vinca#84 .

Now the recipe is failing with:

 │ │ -- Found rmw: 6.1.2 ($PREFIX/share/rmw/cmake)
 │ │ CMake Error at CMakeLists.txt:29 (find_package):
 │ │   By not providing "Findmicrocdr.cmake" in CMAKE_MODULE_PATH this project has
 │ │   asked CMake to find a package configuration file provided by "microcdr",
 │ │   but CMake did not find one.
 │ │ -- Configuring incomplete, errors occurred!
 │ │   Could not find a package configuration file provided by "microcdr" with any
 │ │   of the following names:
 │ │     microcdrConfig.cmake
 │ │     microcdr-config.cmake
 │ │   Add the installation prefix of "microcdr" to CMAKE_PREFIX_PATH or set
 │ │   "microcdr_DIR" to a directory containing one of the above files.  If
 │ │   "microcdr" provides a separate development package or SDK, be sure it has
 │ │   been installed.

that seems a "normal" problem of missing dependencies.

@Tobias-Fischer
Copy link
Contributor

We now need to add https://github.com/micro-ROS/rosidl_typesupport_microxrcedds as additional recipes. The humble version is very old though, I wonder if we should risk kilted (the long-term plan anyhow should be to move the emscripten build to kilted ..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use rmw-zenoh-pico instead of rmw-wasm-cpp for wasm builds
2 participants